- headers = %w[早餐 中餐 晚餐 夜宵]
doctype html
html
  head
    title 菜单
    meta charset='utf-8'
    link href='http://cdn.bootcss.com/foundation/5.4.7/css/foundation.min.css' rel='stylesheet'
    style
      |
        table tbody tr.today { background: #DDF0FF }
        body { padding: 20px }
        .header { width: 25% }
  body
    table
      thead
        tr
          td 日期
          - headers.each do |x|
            td.header = x
      tbody
        - @materials.each do |m|
          - date = m.menu_date
          - extracted = m.menu_extract
          tr class="#{date == @today ? 'today' : ''}"
            td
              span(title="#{m.id}") = date.strftime('%m-%d')
              - weekday = m.menu_weekday
              - if weekday
                br
                span = weekday
            - headers.each do |k|
              td
                - (extracted[k] || {}).each do |k, v|
                  - if !k.empty?
                    b = k
                    span = ': '
                  - v.split("\n").map do |w|
                    - next if w.empty?
                    span = w
                    br
